﻿using HDS.Model.MongoDb;
using MongoDB.Bson.Serialization.Attributes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HDS.Model.Entity.Log
{
    public class ApiLog : BaseObject<string>
    {
        /// <summary>
        /// 跟踪ID
        /// </summary>
        [BsonElement("ti")]
        [BsonRequired]
        public string TrackId { get; set; }

        [BsonElement("rc")]
        [BsonRequired]
        public string RequestAction { get; set; }

        [BsonElement("ru")]
        public string RequestUrl { get; set; }

        [BsonElement("rt")]
        public int RequestTime { get; set; }

        [BsonElement("rs")]
        public ErrorCode RequestStatus { get; set; }

        [BsonElement("rd")]
        public string RequestData { get; set; }

        [BsonElement("rst")]
        public int ResponseTime { get; set; }

        [BsonElement("rsd")]
        public string ResponseData { get; set; }


        [BsonElement("d")]
        [BsonIgnoreIfNull]
        public string Distributor { get; set; }

        [BsonElement("s")]
        [BsonIgnoreIfNull]
        public string Supplier { get; set; }

        [BsonElement("hi")]
        [BsonIgnoreIfNull]
        public int? HotelId { get; set; }

        [BsonElement("shi")]
        [BsonIgnoreIfNull]
        public string SupplierHotelId { get; set; }

        [BsonElement("rpi")]
        [BsonIgnoreIfNull]
        public string RatePlanId { get; set; }

        [BsonElement("ci")]
        [BsonIgnoreIfNull]
        public int? CheckinDate { get; set; }

        [BsonElement("co")]
        [BsonIgnoreIfNull]
        public int? CheckoutDate { get; set; }

        [BsonElement("oi")]
        [BsonIgnoreIfNull]
        public string OrderId { get; set; }

        [BsonElement("n")]
        public string Node { get; set; }
    }
}
